package com.hh.admin.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.FieldStrategy;
import com.baomidou.mybatisplus.enums.IdType;

/**
 * <p>
 * 
 * </p>
 *
 * @author hxn
 * @since 2018-01-16
 */
@TableName("sys_menu")
public class SysMenu implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 菜单编号
     */
	@TableField("menu_code")
	private String menuCode;
    /**
     * 菜单父ID
     */
	@TableField("parent_id")
	private Long parentId;
    /**
     * 当前菜单的所有父菜单编号
     */
	@TableField("current_code")
	private String currentCode;
    /**
     * 菜单名称
     */
	@TableField("menu_name")
	private String menuName;
    /**
     * 菜单图标
     */
	@TableField(strategy=FieldStrategy.NOT_NULL)
	private String icon;
    /**
     * url地址
     */
	private String url;
    /**
     * 菜单排序号
     */
	@TableField("sort_num")
	private Integer sortNum;
    /**
     * 菜单层级
     */
	private Integer level;
    /**
     * 菜单是否启用 1 启用 0 不启用
     */
	@TableField("is_enable")
	private Integer isEnable;
    /**
     * 是否是菜单 1 是 0 不是
     */
	@TableField("is_menu")
	private Integer isMenu;
    /**
     * 是否删除标识 1 删除 0 未删除
     */
	@TableField("is_delete")
    @TableLogic
	private Integer isDelete;
	@TableField(value = "create_time",fill = FieldFill.INSERT)
	private Date createTime;
	@TableField(value = "update_time",fill = FieldFill.UPDATE)
	private Date updateTime;

	@TableField(exist=false)
	private List<SysMenu> childMenu;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getMenuCode() {
		return menuCode;
	}

	public void setMenuCode(String menuCode) {
		this.menuCode = menuCode;
	}


	public List<SysMenu> getChildMenu() {
		return childMenu;
	}

	public void setChildMenu(List<SysMenu> childMenu) {
		this.childMenu = childMenu;
	}

	public Long getParentId() {
		return parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	public String getCurrentCode() {
		return currentCode;
	}

	public void setCurrentCode(String currentCode) {
		this.currentCode = currentCode;
	}

	public String getMenuName() {
		return menuName;
	}

	public void setMenuName(String menuName) {
		this.menuName = menuName;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Integer getSortNum() {
		return sortNum;
	}

	public void setSortNum(Integer sortNum) {
		this.sortNum = sortNum;
	}

	public Integer getLevel() {
		return level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	public Integer getIsEnable() {
		return isEnable;
	}

	public void setIsEnable(Integer isEnable) {
		this.isEnable = isEnable;
	}

	public Integer getIsMenu() {
		return isMenu;
	}

	public void setIsMenu(Integer isMenu) {
		this.isMenu = isMenu;
	}

	public Integer getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(Integer isDelete) {
		this.isDelete = isDelete;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Override
	public String toString() {
		return "SysMenu{" +
			"id=" + id +
			", menuCode=" + menuCode +
			", parentCode=" + parentId +
			", currentCode=" + currentCode +
			", menuName=" + menuName +
			", icon=" + icon +
			", url=" + url +
			", sortNum=" + sortNum +
			", level=" + level +
			", isEnable=" + isEnable +
			", isMenu=" + isMenu +
			", isDelete=" + isDelete +
			", createTime=" + createTime +
			", updateTime=" + updateTime +
			"}";
	}
}
